{% extends "base.jinja" %}

{% block title %}{{cate_data.name}}_{% endblock %}
{% block keywords %}{{cate_data.keywords}}{% endblock %}
{% block description %}{{cate_data.description}}{% endblock %}

{% block css %},main.css{% endblock %}
{% block focussign %}focussign{% endblock %}
{% block pagetype %}cate{% endblock %}

{% block main %}
    <div class="page-banner cate-banner" id="cate-banner" data-cid="{{cate_data.id}}">
        <div class="layout">
            <span class="pb-title">really wedding</span>
            <h2>{{cate_data.name}}</h2>
            <div class="pb-action" id="user-guide-sub">
                <div class="opt-ps">
                    <a class="inp-btn-pk ui-a opt-sub" href="javascript:;" data-act="add" data-cid="{{cate_data.id}}" data-key="{{cate_data.name}}" data-require="sign">订阅</a>
                    <a class="inp-btn-gray ui-a opt-unsub" href="javascript:;" data-act="del" data-cid="{{cate_data.id}}" data-key="{{cate_data.name}}" data-require="sign">取消</a>
                </div>
            </div>
            <span class="page-help"><a href="{{domain}}site/help/#user-i4" target="_blank">如何发布图片和视频？</a></span>
        </div>
    </div>

    <div class="layout mt-crumb">
        <a href="{{domain}}">首页</a>&nbsp;>&nbsp;<b>{{cate_data.name}}</b>
    </div>

    <ul class="cate-tab" id="cate-tab" data-cid="{{cate_data.id}}">
        <li class="active"><a href="{{domain}}share/cate/{{cate_data.id}}/#selected">精选</a></li>
        <li><a href="{{domain}}share/cate/{{cate_data.id}}/#new">最新</a></li>
        <li><a href="{{domain}}share/cate/{{cate_data.id}}/#shopping">商品</a></li>
    </ul>

    <div class="share page" id="share" data-cid="{{cate_data.id}}" data-wf="none">
        <ul>
            <li class="s-tags">
            {% for c in cates %}
                {% if c.id == cate_data.id %}
                <div class="st-item">
                    {% for tag in c.tags %}
                        <a target="_blank" href="{{tag.link}}">{{tag.tag}}</a>
                    {% endfor %}
                </div>
                {% endif %}
            {% endfor %}
            </li>
            {% for share in share_data %}
                <li data-mid="{{share.cover_id}}" data-sid="{{share.share_id}}">
                    <a target="_blank" class="s-link" href="{{domain}}share/detail/all/{{share.share_id}}/">
                        <img alt="#{{cate_data.name}}#{{share.title}}" src="http://s.lovewith.me/static/images/blank.gif" data-orisrc="{{share.cover}}!260" height="200" width="260"/>
                    </a>
                    {% if share.is_video %}
                        <span class="ui ed-video" data-video="{{share.video}}"></span>
                    {% endif %}
                    <div class="s-ext">
                        <p title="{{share.title|forceescape}}"><a target="_blank" href="{{domain}}share/detail/all/{{share.share_id}}/">{{share.title|safe|cut_str(32)}}</a></p>
                        <span class="s-ext-img">{{share.count}}P</span>
                    </div>
                    {% if share.reserve %}
                    <a target="_blank" href="{{domain}}share/detail/all/{{share.share_id}}/#m{{share.cover_id}}" class="ui s-reserve"></a>
                    {% else %}
                        {% if share.sale_data %}
                        <a target="_blank" href="{{domain}}share/detail/all/{{share.share_id}}/#m{{share.cover_id}}" class="ui s-sale"></a>
                        {% endif %}
                    {% endif %}
                </li>
            {% endfor %}
        </ul>
        <div class="s-more"><a href="javascript:;" data-scroll="0" data-page="0" id="s-more-btn" data-action="/share/ajax/g/share/?cate_id={{cate_data.id}}">更多..</a></div>
    </div>

    <input type="hidden" id="ug-content" value="12@user-guide-sub@97@-1" />
{% endblock %}

{% block script %}
<script>seajs.use('page/list', function(p){p.render()});</script>
{% endblock %}